In the shell of Linux
The IF statement determines which branch to execute through the relational operator to determine the true or false of an expression. The Shell has three kinds of if ... else statements:
If ... fi statement;
if ... else .
Recently, I have an idea to replace all these if -- else and if-elseif-else with one command, and then concatenate the command, put them in the commandlist. :)
The product of this idea is as follows:
First, list the common branches and forks.
Let's look at the example below: The following button is used as a command
Package command; import Java. AWT. event. actionevent; import Java. AWT. event. actionlistener; import javax. swing. jbutton; import javax. swing. jframe; import javax. swing.
The main difference between process-oriented design and object-oriented design is whether to use lengthy if else judgment at the business logic layer. If you are still using the if else in large quantities, except for the interface presentation
The main difference between process-oriented design and object-oriented design is whether to use lengthy if else judgment at the business logic layer. If you are still using the if else in large quantities, except for the interface presentation
Banqiao people http://www.jdon.com 2006/1/11
The main difference between process-oriented design and object-oriented design is whether to use lengthy if else judgment at the business logic layer. If you are still using the if else in large
The main difference between process-oriented design and object-oriented design is whether to use lengthy if else judgment at the business logic layer. If you are still using the if else in large quantities, except for the interface presentation
In fact, the meaning of "if else" is the same as the literal meaning, that is, "if" or "otherwise". Let's take a look at an example that uses if.
If you're writing a program for a robot, the robot's function is to evaluate the user's hobby.
Robot:
My answer is: If of more than two else, or switch of more than two cases. However
Code Is it normal to use if else and switch case in large quantities? Error! If else and switch case with more than two branches should not be hard-coded.
Where
The pre-processing process scans the source code and performs initial conversion to generate new source code for the compiler. It can be seen that the preprocessing process processes the source code prior to the compiler.
In C language, there is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.